<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<include file="Public:meta" />
	<style>
		#InfoHit{color:#00F;font-weight:bold;}
		label{color:#00F; line-height:21px; font-weight:bold; height:21px; vertical-align:middle;font-size:12px;}
		.mytip{display:none; background-color:#FFF;padding:6px; line-height:22px;text-align:left;border:1px solid #CCC;}
	</style>
</head>
<body id="main_page">
<include file="Public:position" />
<div class="container">
    <form enctype="multipart/form-data"  method="post" id="frmInfo">
    <input type="hidden" name="ChannelID" id="ChannelID" value="{$ChannelID}" />
    <input type="hidden" name="NowPage" id="NowPage" value="{$NowPage}" />
    <input type="hidden" name="ChannelModelID" id="ChannelModelID" value="{$ChannelModelID}" />
      <div class="table">
        <div  class="toolbars">
            <li class="toolbar"><a id="selectall" onclick="CheckAll()"  title="全选">全选</a></li>
            <li class="toolbar"><a id="del" onclick="BatchDel()" title="批量删除">删除</a></li>
            <li class="toolbar toolbarform">
                <label>关键词</label><input type="text" class='textinput' name="Keywords" style="width:200px" value="{$Keywords}" id="Keywords"/>
                <input id="btnSeek" class="btnToolbarForm" type="submit" value="查询" onclick="Search()">
            </li>
        </div>
        <table class="datatable" id="datatable">
        <tr>
            <th width="40px"  nowrap="nowrap">选中</th>
            <th width="50px" nowrap="nowrap">ID</th>             
            <th width="420px" >标题</th>
            <th width="125px" nowrap="nowrap">时间</th>
            <th style="text-align:left;padding-left:20px">操作</th>
        </tr>  
        <notempty name="Info">                
            <volist name="Info" id="i" key="n">
                <tr id="t{$i.InfoID}">
                    <td><input class="checkrow" type="checkbox" name="InfoID[]" value="{$i.InfoID}" /></td>
                    <td>{$i.InfoID}</td>
                    <td style="text-align:left">{$i.InfoTitle}</td>
                    <td>{$i.InfoTime}</td>
                    <td class="operator">
                        <a style="float:left" id="selectall"  class="feedInfo" rel="targetBox{$n}">查看</a>
                        <div class="btn-sep"></div>
                        <a style="float:left" onclick="Del({$i.InfoID})" class="btnDel">删除</a>
                        <div id="targetBox{$n}" class="mytip">
                            {$i.AllInfo}
                            <b>提交时间：</b><span style="color:#F30">{$i.InfoTime}</span>
                        </div>
                    </td>
                </tr>
            </volist>
        <else/>
            <tr><td colspan="10" id="NoData">{$Think.lang.NoDataTip}</td></tr>
        </notempty>                                
        </table>
        <div class="tfoot"><div class="page">{$Page}</div></div>
    </div>
</form>
</div>
</body>
</html>
<script type="text/javascript">
//批量删除
function BatchDel(){
	//var arrChk = $("input[name='InfoID[]'][checked]"); //在高速浏览器长度总是返回0
	var arrChk = $("input[name='InfoID[]']");
	var n = 0;
	for(var i = 0; i < arrChk.length; i++){
		if(arrChk[i].checked) n++;
	}
	
	if( n == 0 ) {
		WarnBox("{$Think.lang.CheckDeleteTip}");
		return;
	}
	
	$.confirm("{$Think.lang.DeleteTip}", function () {
		$('#frmInfo').attr("action", "__URL__/batchDelFeedback");
		$('#frmInfo').submit();
	}, function () {
		return true;
	});
}

//查询
function Search(){
	$('#frmInfo').attr("action", "__URL__/feedback/ChannelID/{$ChannelID}");
	$('#frmInfo').submit();
	return true;
}	

function Del(id){
	$.confirm("{$Think.lang.DeleteTip}", function () {
		var para = "?Keywords={$Keywords}";
		url = "{$Url}delFeedback/InfoID/"+id+"/ChannelID/{$ChannelID}/p/{$NowPage}"+para;
		location.href = url;
	}, function () {
		return true;
	});
}

//提示信息
$(document).ready(function(){
	$(".feedInfo").powerFloat({
		reverseSharp:true,
		position:"4-1"
	});
	
	//选中操作
	$("#Keywords").focus();
});
</script>